<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title></title>
<link href="console.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
.even {
	background:	#eee;
}

.odd {

}
</style>
</head>

<body>
<jsp:include page="/title.jsp" flush="true"/>
	<p class="lnkhead2"><bean:message key="menu.timers"/>&gt;<bean:message key="menu.timeActivities"/></p>
	<form name="form" method="post" action="timer.do">
	<input type="hidden" name="act" value="listActivity"/>
		<input type="hidden" name="pageup" value="<bean:write name='pageup'/>"/>			
			<input type="hidden" name="begin"  value="0"/>		
			<input type="hidden" name="length" value="15"/>
			<input type="hidden" name="pagedown" value="<bean:write name='pagedown'/>"/>
	<table width="95%" border="0" cellpadding="0"  cellspacing="0">
		<tr  class="txtnormal2">
		<td><bean:message key="process.id"/>
		<input type="text" name="processId" value="<bean:write name='processId'/>"  size="10"/>
		</td>
		<td><bean:message key="case.id"/>
		<input type="text" name="caseId" value="<bean:write name='caseId'/>"  size="10"/>
		</td>
		<td><bean:message key="time.fireTime"/>
		<input type="text" id="start" name="startDateAfter" value="<bean:write name='startDateAfter'/>"  readonly="true" size="10"/>
		<a href="javascript:void(0)" 

onclick="if(self.gfPop)gfPop.fPopCalendar(start);return false;" 

HIDEFOCUS><img name="popcal" align="absmiddle" src="calendar/calbtn.gif" 

width="34" height="22" border="0" alt=""></a>
		-<input type="text" id="end" name="startDateBefor" value="<bean:write name='startDateBefor'/>"  readonly="true" size="10"/>
				<a href="javascript:void(0)" 

onclick="if(self.gfPop)gfPop.fPopCalendar(end);return false;" 

HIDEFOCUS><img name="popcal" align="absmiddle" src="calendar/calbtn.gif" 

width="34" height="22" border="0" alt=""></a>
				</td>
		<td><input  type="button" name="query_button" value="<bean:message key='button.query'/>" onclick="javascript:query()">
	</td>
		</tr>
		</table>
	<table width="98%" border="0" cellpadding="1" class="sort-table" id="table-1" cellspacing="0">
	
	<thead>
			
			<tr >
				<td align="center" width="4%">		
				&nbsp;						
				</td>
				<td align="center" width="12%">
				<bean:message key="process.id"/>
				
				</td>
				<td align="center" width="30%">
					<bean:message key="heading.desc"/>
				
					
				</td>
				<td align="center" width="10%">
					
					<bean:message key="heading.createDate"/>
					
				</td>
				<td align="center" width="10%">
					
					<bean:message key="time.fireTime"/>
					
				</td>
				
				
			</tr>
	  </thead>
			<tbody>
			<% int i=0; String color;String check="";%>
			
			<logic:iterate id="caserun" name="list">
				<% i++; if(i%2==1) color="odd"; else color="even"; if(i==1) check="checked"; else check="";%>
				
				<tr  class="<%=color%>">
					<td align="center">
					<input type="radio"  <%=check%> name="name"  value="<bean:write name="caserun" property="name"/>" 
					onclick="javascript:todoSelected()" />
					</td>
					<td align="left">
						
						<bean:write name="caserun" property="processId" filter="true"/>
						
					</td>
					<td align="left">
						
						<bean:write name="caserun" property="desc" filter="true"/>
						
					</td>
					<td align="center">
						
						<bean:write format="yyyy-MM-dd HH:mm" name="caserun" property="createDate"/>
						
					</td>
					
				<td align="center">
						
						<bean:write format="yyyy-MM-dd HH:mm" name="caserun" property="nextFireDate" filter="true"/>
						
					</td>
					
					</tr>
			
			</logic:iterate>
	  </tbody>
</table>
	<table width="95%">		
			<tr >
				<td align="left">
				<input  type="button" name="fire_button" value="<bean:message key="time.fireNow"/>" onclick="javascript:fireJob()"  disabled = "true">
				</td>
				<td>
								</td>
				<td align="right">
					
					<logic:greaterEqual name="pageup" value="0">
						
						<a  class="lnksub1" href="javascript:pageup()">
							
							<bean:message key="button.pageup"/>
							
						</a>
						
					</logic:greaterEqual>
					
					<logic:notEqual name="pagedown" value="0">
						
						<a  class="lnksub1" href="javascript:pagedown()">
							
							<bean:message key="button.pagedown"/>
							
						</a>
						
					</logic:notEqual></td>
				
			</tr>
			</table>
			
			
		
			<script type="text/javascript">
var st = new SortableTable(document.getElementById("table-1"),
	["None","String", "String","String",  "String"]);
	</script>
	<script type="text/javascript">
	function todoSelected(state){
		var frm = document.forms["form"];
		frm.elements["fire_button"].disabled = false;
		frm.elements["cancel_button"].disabled = false;
	}
	function fireJob(){
	var frm = document.forms["form"];
	var id=(selectedRadiobox(frm,"name"));
	//if( !confirm("È·¶¨´¥·¢¶¨Ê±»î¶¯£¨"+id+"£©?")) return;
	frm.elements["act"].value="fireActivityJob";
	frm.submit();
	};
	function cancelJob(){
	var frm = document.forms["form"];
	var id=(selectedRadiobox(frm,"name"));
	//if( !confirm("È·¶¨È¡Ïû¶¨Ê±»î¶¯£¨"+id+"£©?")) return;
	frm.elements["act"].value="cancelActivityJob";
	frm.submit();
	};
	
	</script>
	<script type="text/javascript">
	function pagedown()
	{
	var frm = document.forms["form"];
	frm.elements["begin"].value=frm.elements["pagedown"].value;
	frm.submit();
	}
	function pageup()
	{
	var frm = document.forms["form"];
	frm.elements["begin"].value=frm.elements["pageup"].value;
	frm.submit();	
	}
	function query()
	{
	var frm = document.forms["form"];
	if(frm.elements["caseId"].value!="0"&&frm.elements["caseId"].value!=""){
		if(checkInt1(frm.elements["caseId"],"<bean:message key="case.id"/>")==false) return;
	}
	frm.elements["begin"].value = 0;
	frm.submit();	
	}
	
</script>
<!--  PopCalendar(tag name and id must match) Tags should sit at the page bottom -->
<iframe width=174 height=189 name="gToday:normal:agenda.js" 

id="gToday:normal:agenda.js" src="calendar/ipopeng.htm" 

scrolling="no" frameborder="0" style="visibility:visible; z-index:999; 

position:absolute; left:-500px; top:0px;">
</iframe>
<%@ include file="/table_bottom.jsp" %>
<logic:notEmpty name="returnMsg">
	<script>
	alert('<bean:write name="returnMsg"/>');
	</script>
	</logic:notEmpty>
</body>
</html:html>





